<?php
echo "<h1>test of the get_correct_response(response_id) function :</h1>";
require_once 'Mysql.php';
$m = new Mysql();
for($i=1;$i<6;$i++){
echo "<br /> correct : ".$m->get_correct_response($i)." -> response : ".$i;
}
/////////////// score test /////////
echo "<hr>";
echo "<h1>get_score(user_id) test :</h1>";
for($i=1;$i<6;$i++){
echo "id = ".$i."| score = ".$m->get_score($i)."<br />";
}
echo "<hr>";
echo "<h1>incrementer_score(user_id) test :</h1>";
echo "incrementing score for user 1<br />";
$m->incrementer_score(1);
echo "score = ".$m->get_score(1)."<br />";
echo "incrementing score again for user 1<br />";
$m->incrementer_score(1);
echo "score = ".$m->get_score(1)."<br />";
////////////////// question pointer test //////////////////////
echo "<h1>getcount(user_id) test :</h1>";
for($i=1;$i<6;$i++){
echo "id = ".$i."| score = ".$m->getcount($i)."<br />";
}

echo "<hr>";
echo "<h1>incrementcount(user_id) test :</h1>";
$m->incrementcount(1);
echo "counter = ".$m->getcount(1)."<br />";
$m->incrementcount(1);
echo "counter = ".$m->getcount(1)."<br />";